require 'yaml'
require 'fileutils'

class Configuration < OpenStruct
  FILE_PATH = File.expand_path('~/.pushnote.yml')

  def initialize
    unless File.exist?(FILE_PATH)
      template_path = File.expand_path('../../../.pushnote.yml', __FILE__)
      FileUtils.cp(template_path, FILE_PATH)
    end
    super(YAML.load_file(FILE_PATH))
  end
end
